package com.dabai.applicationmanager.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.dabai.applicationmanager.R;
import com.dabai.applicationmanager.bean.SmallProgramInfo;

import java.util.ArrayList;

/**
 * Description : Other
 *
 * @author BAI
 */
public class SmallProgramAdapter extends BaseQuickAdapter<SmallProgramInfo, BaseViewHolder> {


    public SmallProgramAdapter(ArrayList<SmallProgramInfo> smallProgramInfos) {
        super(R.layout.item_small_program, smallProgramInfos);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, SmallProgramInfo smallProgramInfo) {
        baseViewHolder.setImageResource(R.id.imageView, smallProgramInfo.getIcon());
        baseViewHolder.setText(R.id.textView1,smallProgramInfo.getTitle());
        baseViewHolder.setText(R.id.textView2,smallProgramInfo.getDescription());
    }
}
